<?php
/**
 * Created by IntelliJ IDEA.
 * User: 张伯发
 * Date: 2019/8/2
 * Time: 11:39
 */

namespace App\Model\Dao;


use App\Common\Util\ArrayUtil;
use App\Model\Entity\Member;
use PhpOption\Option;
use Swoft\Bean\Annotation\Mapping\Bean;

/**
 *
 * Class MemberDao
 * @Bean()
 * @author 张伯发 2019/8/2 11:39
 */
class MemberDao
{

    /**
     * @throws \ReflectionException
     * @throws \Swoft\Bean\Exception\ContainerException
     * @throws \Swoft\Db\Exception\DbException
     * @author 张伯发 2019/8/2 11:45
     */
    public function addMember()
    {
        $member = new Member();
        $member->setUsername('happy-user');
        $member->setPassword("happy-password");
        $member->save();
    }


    /**
     * @param array $param
     * @author 张伯发 2019/8/2 14:35
     */
    public function register(array $param)
    {
        $username = ArrayUtil::get($param, 'username');
        $password = ArrayUtil::get($param, 'password');










    }
}
